package com.ruoyi.novel.domain;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 社区信息对象 a_community
 *
 * @author 张三
 * @date 2025-04-18
 */
@TableName("a_community")
public class Community  extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /**  */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /** 父文章 */
    private Integer pId;

    /** 用户 */
    private Integer userId;

    /** 分类一 */
    private Integer type1;

    /** 分类二 */
    private Integer type2;

    /** 标题 */
    @Excel(name = "标题")
    private String title;

    /** 内容 */
    private String conetnt;

    /** 详情 */
    private String details;

    /** 图片 */
    @Excel(name = "图片")
    private String image;

    /** 积分 */
    @Excel(name = "积分")
    private BigDecimal integral;

    /** 标签 */
    private String label;

    /** 状态 */
    private Integer state;

    @TableField(exist = false)
    private User user;

    /** 浏览次数 */
    @TableField(exist = false)
    private Integer browseNum;

    /** 收藏次数 */
    @TableField(exist = false)
    private Integer collectNum;

    /** 是否收藏 */
    @TableField(exist = false)
    private Integer isCollect;

    public void setId(Integer id)
    {
        this.id = id;
    }

    public Integer getId()
    {
        return id;
    }
    public void setpId(Integer pId)
    {
        this.pId = pId;
    }

    public Integer getpId()
    {
        return pId;
    }
    public void setUserId(Integer userId)
    {
        this.userId = userId;
    }

    public Integer getUserId()
    {
        return userId;
    }
    public void setType1(Integer type1)
    {
        this.type1 = type1;
    }

    public Integer getType1()
    {
        return type1;
    }
    public void setType2(Integer type2)
    {
        this.type2 = type2;
    }

    public Integer getType2()
    {
        return type2;
    }
    public void setTitle(String title)
    {
        this.title = title;
    }

    public String getTitle()
    {
        return title;
    }
    public void setConetnt(String conetnt)
    {
        this.conetnt = conetnt;
    }

    public String getConetnt()
    {
        return conetnt;
    }
    public void setImage(String image)
    {
        this.image = image;
    }

    public String getImage()
    {
        return image;
    }
    public void setIntegral(BigDecimal integral)
    {
        this.integral = integral;
    }

    public BigDecimal getIntegral()
    {
        return integral;
    }
    public void setLabel(String label)
    {
        this.label = label;
    }

    public String getLabel()
    {
        return label;
    }
    public void setState(Integer state)
    {
        this.state = state;
    }

    public Integer getState()
    {
        return state;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public Integer getBrowseNum() {
        return browseNum;
    }

    public void setBrowseNum(Integer browseNum) {
        this.browseNum = browseNum;
    }

    public Integer getCollectNum() {
        return collectNum;
    }

    public void setCollectNum(Integer collectNum) {
        this.collectNum = collectNum;
    }

    public Integer getIsCollect() {
        return isCollect;
    }

    public void setIsCollect(Integer isCollect) {
        this.isCollect = isCollect;
    }

    public String getDetails() {
        return details;
    }

    public void setDetails(String details) {
        this.details = details;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("pId", getpId())
            .append("userId", getUserId())
            .append("type1", getType1())
            .append("type2", getType2())
            .append("title", getTitle())
            .append("conetnt", getConetnt())
            .append("image", getImage())
            .append("integral", getIntegral())
            .append("label", getLabel())
            .append("state", getState())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
